LastIndexOf Method (T, Int32)

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Finds the index of the last item, in the range of items extending from the beginning of the list to index, that is equal to item.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public virtual int LastIndexOf(
	T item,
	int index
)
Visual Basic (Declaration)
Public Overridable Function LastIndexOf ( _
	item As T, _
	index As Integer _
) As Integer
Visual C++
public:
virtual int LastIndexOf (
	T item, 
	int index
)

Parameters

item
T
The item to search fror.
index
Int32
The ending index of the range to check.

Return Value

The index of the last item in the given range that that is equal to item. If no item is equal to item, -1 is returned.

Remarks

The default implementation of equality for type T is used in the search. This is the equality defined by IComparable<T> or object.Equals.

See Also